﻿using LPLS.PluginCommon;
using LPLS.PluginCommon.ModulePlugin;
using PLCAlarmRuleConfigModule.Views;
using Prism.Ioc;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;

namespace PLCAlarmRuleConfigModule.ViewModels
{

    [ViewModelMetadata(projectID: "12322222", viewModelName: "PLC变量配置", version: "1.0.1", lifecycle: Lifecycle.Singleton, index: 0, isCommon: true)]
    public  class PLCAlarmRuleConfigViewModel : ViewModelBase
    {


        private ObservableCollection<TabItem> _tabItems;

        public PLCAlarmRuleConfigViewModel(IContainerProvider containerProvider) : base(containerProvider)
        {

            InitializeTabs();
        }

        public ObservableCollection<TabItem> TabItems
        {
            get { return _tabItems; }
            set { SetProperty(ref _tabItems, value); }
        }

        private void InitializeTabs()
        {
            TabItems = new ObservableCollection<TabItem>
        {
            CreateTabItem("属性配置", typeof(VariableConfigView)),
            CreateTabItem("报警代码", typeof(VariableCodeConfigView)),
              CreateTabItem("报警代码规则配置", typeof(AlarmVarableCodeRuleConfigView)),
            
        };
        }

    }
}
